1. Field of the Invention
The present invention relates to a communication system in which a numerical controller and one or more IO units, each having a communication controller, are connected and communication data is transmitted and received between the numerical controller and the communication controllers of the IO units.
2. Description of the Related Art
A configuration, in which a plurality of external signal input/output units (IO units) are connected, is adopted for input/output of DI/DO signals between a numerical controller and a machine tool (not shown). As shown in FIG. 1, DI/DO signals are normally transferred between a numerical controller 10 and an IO unit 30 and between the IO unit 30 and an IO unit 32.
If communication controllers 31, 33 of the IO units 30, 32 confirm that the ID contained in the header of the received communication data matches the ID set to their own setting register, in communication with the numerical controller 10, then the communication controllers 31, 33 recognize that received data is addressed to the communication controllers 31, 33 and return data to the numerical controller 10 (see Japanese Patent Application Laid-Open No. 2008-191989). When a DI/DO signal returned from the IO units 30, 32 is actually used by a sequence program operating inside the numerical controller 10, it is necessary to allocate the DI/DO signal to an internal address of the numerical controller 10. Safety signals needed to avoid danger such as an emergency stop signal and a door switch are contained in the DI/DO signal.
Incidentally, IEC61508, ISO13849-1 and the like exist as safety standards in an electrical and electronics safety related system or a machinery control system. The above safety signals are desirably processed and transferred according to such standards. Japanese Patent Application Laid-Open No. 2013-235300 discloses processing and a transfer method according to a standard.
In Japanese Patent Application Laid-Open No. 2013-235300 described above, as shown in FIG. 2, corresponding to a first CPU 11 and a second CPU 12, the first IO unit 30 and the second IO unit 32 exist, and a high level of safety is secured by safety signals being independently processed and transferred by a set of the first CPU 11 and the first IO unit 30 and a set of the second CPU 12 and the second IO unit 32 (see FIG. 2). The transfer of signal conforms to PROFIsafe and a count value, CRC and the like are attached to communication data. Because, as described above, the set of the first CPU 11 and the first IO unit 30 and the set of the second CPU 12 and the second IO unit 32 are independent of each other, two sets are available as values attached to these sets and are independent of each other.
In this case, it is important that the data attached is unrelated values independent of each other to secure safety. If, for example, the second IO unit 32 erroneously attempts to process data of the first CPU 11, an error occurs because the attached counter value is different. Because of such a mechanism, the combination of the first CPU 11 and the first IO unit 30 and the combination of the second CPU 12 and the second IO unit 32 cannot be changed. That is, it is impossible to allocate a DI/DO signal of the second IO unit 32 to an address of the first CPU 11, to allocate a DI/DO signal of the first IO unit 30 to an address of the second CPU 12, or to allocate the first IO unit 30 to both addresses of the first CPU 11 and the second CPU 12. This is because, as described above, the counter value and CRC attached to communication data correspond to the combination of the CPU and the IO unit and cannot be changed.
In recent years, machine tools are increasingly diversified and it is not rare to design a machine having a wide range of variations. The number of DI/DO signals needed for the configuration is different from variation to variation. From the viewpoint of cost, it is important to design each configuration such that the number of IO units to be connected is minimized.
However, if configured by using the method described in JP 2013-235300 mentioned above in case where a safety signal is contained in a DI/DO signal, more IO units than necessary may have to be connected because the combination of the CPU and the IO unit cannot be changed. For example, consider first a case where a machine whose total points of a safety DI signal are 32 points (bits) is configured by an IO unit having a DI signal of 32 points per unit. The two (first and second) CPUs 11, 12 are included and the safety DI signal has 32 points and therefore, the machine can be configured by two IO units of the first IO unit 30 and the second IO units 32, each having a DI signal of 32 points, as shown in FIG. 3.
However, when a machine whose total points of the safety DI signal are 48 points is designed as a product line of the same machine, the increased points of the safety DI signal from the system in FIG. 3 are 16 points and a DI signal of 2×16 points=32 points is enough and, thus, total points could be covered by adding one IO unit (third IO unit 40) of 32 points. In reality, however, as described above, the first and second IO units need to be combined with the first and second CPUs 11, 12, respectively. Thus, further two IO units, the third IO unit 40 and a fourth IO unit 42, need to be connected (see FIG. 4).
When a safety DI/DO signal is configured, therefore, according to the above method described in Japanese Patent Application Laid-Open No. 2013-235300, a problem that more IO units than necessary may need to be connected is posed due to constraints of the allocation of CPUs and IO units.